Skip to content

Conversation

@gaobinlong
Copy link
Contributor

Description

See gradle check log: https://build.ci.opensearch.org/job/gradle-check/66006/console, the test is flaky when there're more than 10 documents in the shard 0, so the 2nd page starts from sort value 10, 11, and then a big value 4294967296, so when checking - gt: { hits.hits.2.sort.0: $prev }, the right value and also the expected value is 11, left is 4294967296, we check the type of the expected value firstly and then convert the left value to the same type which is integer :


, so NumberFormatException is thrown.

The solution is to check the sort values reversely from the last document to the first document and use lt instead, at this point, we convert a small value to a long value, no error happens.

Related Issues

#14408

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@gaobinlong gaobinlong requested a review from a team as a code owner October 23, 2025 14:37
@github-actions
Copy link
Contributor

❌ Gradle check result for 9430754: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 0c444a5: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for b12ccca: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for b12ccca: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 87fbd29: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 87fbd29: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

✅ Gradle check result for 87fbd29: SUCCESS

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.19%. Comparing base (2fddcd8) to head (5c26cf6).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19746      +/-   ##
============================================
- Coverage     73.25%   73.19%   -0.06%     
+ Complexity    71612    71556      -56     
============================================
  Files          5785     5785              
  Lines        326905   326900       -5     
  Branches      47280    47280              
============================================
- Hits         239480   239282     -198     
- Misses        68220    68419     +199     
+ Partials      19205    19199       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gaobinlong
Copy link
Contributor Author

@reta, could you help to review this PR, thanks!

@github-actions
Copy link
Contributor

✅ Gradle check result for 5c26cf6: SUCCESS

@reta
Copy link
Contributor

reta commented Nov 13, 2025

@reta, could you help to review this PR, thanks!

@gaobinlong my apologies, missed it somehow, will take a look shortly

Copy link
Contributor

@reta reta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clever workaround of limitations we have in our test scaffolding, thank you @gaobinlong !

@gaobinlong gaobinlong merged commit 9784927 into opensearch-project:main Nov 14, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants